
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Bearing functions &#8212; Bearing Vibration Diagnostics Toolbox 1.0 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Plotting funtions" href="plt.html" />
    <link rel="prev" title="Signal features" href="features.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="plt.html" title="Plotting funtions"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="features.html" title="Signal features"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Bearing Vibration Diagnostics Toolbox 1.0 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-pyvib.bearing">
<span id="bearing-functions"></span><h1>Bearing functions<a class="headerlink" href="#module-pyvib.bearing" title="Permalink to this headline">¶</a></h1>
<p>bearing</p>
<dl class="function">
<dt id="pyvib.bearing.bearingcharfrequencies">
<code class="descclassname">pyvib.bearing.</code><code class="descname">bearingcharfrequencies</code><span class="sig-paren">(</span><em>D</em>, <em>d</em>, <em>n</em>, <em>theta=0.0</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearingcharfrequencies" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate bearing characteristic orders from dimensions.
Equations taken from:
Rolling element bearing diagnostics-A tutorial by R Randall and J Antoni</p>
<blockquote>
<div></div></blockquote>
<dl class="docutils">
<dt>D <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd>Pitch diameter</dd>
<dt>d <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd>roller diameter</dd>
<dt>n <span class="classifier-delimiter">:</span> <span class="classifier">int</span></dt>
<dd>Number of rollers</dd>
<dt>theta <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd><p class="first">Contact angle in degrees</p>
<p class="last">bearing : array_like
Bearing fault orders (inner, roller, cage, outer)</p>
</dd>
</dl>
</dd></dl>

<dl class="class">
<dt id="pyvib.bearing.bearinglifetimemodel">
<em class="property">class </em><code class="descclassname">pyvib.bearing.</code><code class="descname">bearinglifetimemodel</code><span class="sig-paren">(</span><em>L10</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearinglifetimemodel" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a Weibull lifetime distribution for a bearing</p>
<blockquote>
<div></div></blockquote>
<dl class="docutils">
<dt>L10 <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first">Lifetime of bearing in million revolutions</p>
<p class="last">bearing : class object
Bearing object</p>
</dd>
</dl>
<dl class="method">
<dt id="pyvib.bearing.bearinglifetimemodel.life">
<code class="descname">life</code><span class="sig-paren">(</span><em>S</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearinglifetimemodel.life" title="Permalink to this definition">¶</a></dt>
<dd><p>Get lifetime in million revs based on probability of survival</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>S</strong> (<em>float</em>) – Probability of survival. &lt;0.0, 1.0&gt;</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>L</strong> – Lifetime in million revolutions</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="pyvib.bearing.bearinglifetimemodel.survival">
<code class="descname">survival</code><span class="sig-paren">(</span><em>L</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearinglifetimemodel.survival" title="Permalink to this definition">¶</a></dt>
<dd><p>Get survival probability based on number of revs</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>L</strong> (<em>float</em>) – Lifetime in million revs</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>S</strong> – Survival probability &lt;0.0, 1.0&gt;</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="pyvib.bearing.bearingsimulation">
<code class="descclassname">pyvib.bearing.</code><code class="descname">bearingsimulation</code><span class="sig-paren">(</span><em>t</em>, <em>s</em>, <em>fo</em>, <em>beta=1000.0</em>, <em>omr=10400.0</em>, <em>taustd=0.02</em>, <em>initpause=0.0</em>, <em>amp=1.0</em>, <em>debug=False</em>, <em>seed=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearingsimulation" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a simulation of a bearing with an outer race fault</p>
<blockquote>
<div></div></blockquote>
<dl class="docutils">
<dt>t <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>Time signal</dd>
<dt>s <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>Shaft angle position in number of rounds</dd>
<dt>fo <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd>Outer race fault frequency</dd>
<dt>beta <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>The damping ratio</dd>
<dt>omr <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>Resonance frequency in Hz</dd>
<dt>taustd <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>Standard deviation change in percentage between each impact</dd>
<dt>initpause <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>Initial pause in rounds before first impact</dd>
<dt>amp <span class="classifier-delimiter">:</span> <span class="classifier">float or function, optional</span></dt>
<dd><p class="first">The impact amplitude vibration:
- If float, the same amplitude all the time
- If function, the instantaneous velocity is used as input and</p>
<blockquote class="last">
<div>the amplitude is returned</div></blockquote>
</dd>
<dt>debug <span class="classifier-delimiter">:</span> <span class="classifier">boolean, optional</span></dt>
<dd>Whether debug information is returned
If true, the percentage finished is printed</dd>
<dt>seed <span class="classifier-delimiter">:</span> <span class="classifier">int or None, optional</span></dt>
<dd>Choose a seed number for numpy, must be positive.</dd>
<dt>x <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>The bearing vibration</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="pyvib.bearing.bearingsimulation_ahc">
<code class="descclassname">pyvib.bearing.</code><code class="descname">bearingsimulation_ahc</code><span class="sig-paren">(</span><em>t</em>, <em>s</em>, <em>fo</em>, <em>amp</em>, <em>beta=1000.0</em>, <em>omr=3543.0</em>, <em>initpause=0.5</em><span class="sig-paren">)</span><a class="headerlink" href="#pyvib.bearing.bearingsimulation_ahc" title="Permalink to this definition">¶</a></dt>
<dd><p>Make a simulation of a bearing with an outer race fault
where the shaft speed can pass 0 rpm speed.</p>
<blockquote>
<div></div></blockquote>
<dl class="docutils">
<dt>t <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>Time signal</dd>
<dt>s <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>Shaft angle position in number of rounds</dd>
<dt>fo <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd>Outer race fault frequency</dd>
<dt>amp <span class="classifier-delimiter">:</span> <span class="classifier">function(v)</span></dt>
<dd>Amplitude function with shaft velocity as input.
Must return scalar amplitude only</dd>
<dt>beta <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>The damping ratio</dd>
<dt>omr <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>Resonance frequency in Hz</dd>
<dt>initpause <span class="classifier-delimiter">:</span> <span class="classifier">float, optional</span></dt>
<dd>Initial pause in fault-periods before first impact</dd>
<dt>x <span class="classifier-delimiter">:</span> <span class="classifier">float 1D array</span></dt>
<dd>The bearing vibration</dd>
</dl>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="features.html"
                        title="previous chapter">Signal features</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="plt.html"
                        title="next chapter">Plotting funtions</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/bearing.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="plt.html" title="Plotting funtions"
             >next</a> |</li>
        <li class="right" >
          <a href="features.html" title="Signal features"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Bearing Vibration Diagnostics Toolbox 1.0 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2019, Andreas Klausen.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
    </div>
  </body>
</html>